#include <QtCore/QCoreApplication>
#include <opencv2/opencv.hpp>
#include <PoseDetcetion.h>
#include <Windows.h>
DWORD WINAPI StartListen(LPVOID pvoid) {
	PoseDetcetion::init();
	Sleep(1000);
	PoseDetcetion::HCCSDK_POSE_SERVER();
	return 0;
}
int main(int argc, char *argv[])
{
	

	cv::VideoCapture cap;
	cap.open(0);
	cv::Mat frame;
	
	HANDLE thread = CreateThread(NULL, 0, StartListen, NULL, 0, NULL);
	Sleep(10000);
	while (cap.isOpened())
	{
		cap >> frame;
		//cv::Mat outputImage = PoseDetcetion::detcetPose(frame);
		PoseDetcetion::lock = true;
		PoseDetcetion::image_msg_queue.push(frame);
		PoseDetcetion::lock = false;
		cv::imshow("figure", frame);
		cv::waitKey(1);
	}
	system("pause");
}
